﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="NovelDB"
   namespace="NovelDB.Entity">
  <class name="NovelLink">
    <id name="Id" column="Id">
      <generator class="native"/>
    </id>

    <version name="Version" type="int" unsaved-value="0"/>

    <property name="LinkId" column="LinkId" type="int" not-null="true"/>
    
    <property name="Href" column="Href" type="string" length="250" not-null="true"/>
    <property name="Title" column="Title" type="string" length="250" not-null="true"/>
    <property name="Description" column="Description" type="string" length="500" not-null="false"/>
    <property name="UpdateTime" column="UpdateTime" type="string" length="250" not-null="false"/>
    <property name="SiteUrl" column="SiteUrl" type="string" length="250" not-null="false"/>
    <property name="IsUpdated" column="IsUpdated" type="bool" not-null="true"/>

    <many-to-one name="NovelChapter" column="NovelChapter" not-null="false" class="NovelChapter" foreign-key="FK_NovelChapterLinks"/>
    
  </class>
</hibernate-mapping>